package chatRoom;

import java.net.SocketException;
import java.util.Scanner;

public class ChatRoom {
    public static void main(String[] args) throws SocketException {
        Scanner in=new Scanner(System.in);
        System.out.println("请输入接收端IP：");
String serverIp=in.nextLine();
        System.out.println("请输入接收端端口：");
        int port=in.nextInt();
        System.out.println("聊天室启动");
        Thread sendThread= new Thread(new Sender(port,serverIp),"发送端");
        Thread ReceiverThread=new Thread(new Receiver(port),"接收端");
        sendThread.start();
        ReceiverThread.start();

    }

}
